home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / pixie.cpt / Pixie Scheme ƒ / PixieScheme.rsrc / STR#_135.txt < prev    next >
Encoding:
Text File  |  1991-01-07  |  13.5 KB  |  597 lines

  1. (* 2 3 4) => 24; (*) => 1
  2.  
  3. (+ 2 3 4) => 9; (+) => 0
  4.  
  5. (- 3) => -3; (- 2 3) => -1; (- 2 3 4) => -5
  6.  
  7. (/ 2) => 0.5; (/ 3 4) => 0.75; (/ 3 4 5) => 0.15
  8.  
  9. (> 5 4 3) => #t; (> 5 3 4) => #f
  10.  
  11. (>= 5 4 3) => #t; (>= 5 3 4) => #f; (>= 5 3 3) => #t
  12.  
  13. (= 2 2 2) => #t; (= 2 3 2) => #f
  14.  
  15. (< 3 4 5) => #t; (< 4 3 5) => #f
  16.  
  17. (<= 3 4 5) => #t; (<= 4 3 5) => #f; (<= 3 3 5) => #t
  18.  
  19. (abs -2) => 2; (abs 3) => 3
  20.  
  21. (acos 0.5) =>1.047198; (acos #L0.75) => 0.7227342478134156108
  22.  
  23. (e::set-current-folder! "MyDisc:MyFolder:MySubFolder") => #t; (e::set-current-folder!) => (dialog box) => #t
  24.  
  25. (append) => (); (append '(1 2 3) '(4 5 6)) => (1 2 3 4 5 6); (append '(1) () '(2)) => (1 2); (append '(1 2 3) '(4 5 6) 7) => (1 2 3 4 5 6 . 7)
  26.  
  27. (apply + '(1 2 3 4 5)) => 15; (apply + 1 2 3 '(4 5)) => 15
  28.  
  29. (asin 0.5) => 0.5235988; (asin #L0.75) => 0.848062078981481008
  30.  
  31. (assoc 1 '((2 4) (1 5) (3 6) (1 2))) => (1 5); (assoc 4 '((2 4) (1 5))) => ()
  32.  
  33. (assq #f '((2 4) (#t 5) (3 6) (#f 2))) => (#f 2); (assq #f '((2 4) (1 5))) => ()
  34.  
  35. (assv #f '((2 4) (#t 5) (3 6) (#f 2))) => (#f 2); (assv 'foo '((2 4) (1 5))) => ()
  36.  
  37. (atan 0.5) => 0.4636476; (atan #L0.75) => 0.6435011087932843868; (atan -1000 0) => -1.570796
  38.  
  39. (begin (display (+ 2 2)) (newline) (+ 3 4)) writes "4" and a newline to the default output port, and returns 7.
  40.  
  41. (boolean? #t) => #t; (boolean? 3) => #f
  42.  
  43. (caaaar '((((x))))) => x
  44.  
  45. (caaadr '(1 ((x)))) => x
  46.  
  47. (caaar '(((x)))) => x
  48.  
  49. (caadar '((1 (x)))) => x
  50.  
  51. (caaddr '(1 2 (x))) => x
  52.  
  53. (caadr '(1 (x))) => x
  54.  
  55. (caar '((x))) => x
  56.  
  57. (cadaar '(((1 x)))) =>x
  58.  
  59. (cadadr '(1 (2 x))) => x
  60.  
  61. (cadar '((1 x))) => x
  62.  
  63. (caddar '((1 2 x))) => x
  64.  
  65. (cadddr '(1 2 3 x)) => x
  66.  
  67. (caddr '(1 2 x)) => x
  68.  
  69. (cadr '(1 x))
  70.  
  71. (+ 2 (call-with-current-continuation (lambda (f) (f 3)))) => 5
  72.  
  73. (car '(x)) => x
  74.  
  75.  
  76.  
  77. (cdaaar '((((1 . x))))) => x
  78.  
  79. (cdaadr '(1 ((2 . x)))) => x
  80.  
  81. (cdaar '(((1 . x)))) => x
  82.  
  83. (cdadar '((1 (2 . x)))) => x
  84.  
  85. (cdaddr '(1 2 (3 . x))) => x
  86.  
  87. (cdadr '(1 (2 . x))) => x
  88.  
  89. cdar '((2 . x))) => x
  90.  
  91. (cddaar '(((1 2 . x)))) => x
  92.  
  93. (cddadr '(1 (2 3 . x))) => x
  94.  
  95. (cddar '((1 2 . x))) => x
  96.  
  97. (cdddar '((1 2 3 . x))) => x
  98.  
  99. (cddddr '(1 2 3 4 . x)) => x
  100.  
  101. (cdddr '(1 2 3 . x)) => x
  102.  
  103. (cddr '(1 2 . x)) => x
  104.  
  105. (cdr '(1 . x)) => x
  106.  
  107. (ceiling -1.5) => -1.; (ceiling -1.) => -1.; (ceiling 1.01) => 2.
  108.  
  109. (char->integer #\a) => 97; (char->integer #\space) => 32
  110.  
  111. (char-alphabetic? #\a) => #t; (char-alphabetic? #\newline) => #f
  112.  
  113. (char-ci<=? #\c #\B) => #f; (char-ci<=? #\c #\D) => #t; (char-ci<=? #\c #\C) => #t
  114.  
  115. (char-ci<? #\c #\B) => #f; (char-ci<? #\c #\D) => #t; (char-ci<? #\c #\C) => #f
  116.  
  117. (char-ci=? #\c #\B) => #f; (char-ci=? #\c #\D) => #f; (char-ci=? #\c #\C) => #t
  118.  
  119. (char-ci>=? #\c #\B) => #t; (char-ci>=? #\c #\D) => #f; (char-ci>=? #\c #\C) => #t
  120.  
  121. (char-ci>? #\c #\B) => #t; (char-ci>? #\c #\D) => #f; (char-ci>? #\c #\C) => #f
  122.  
  123. (char-downcase #\A) => #\a; (char-downcase #\a) => #\a; (char-downcase #\@)=> #\@
  124.  
  125. (char-lower-case? #\a) => #t; (char-lower-case? #\A) => #f; (char-lower-case? #\3) => #f
  126.  
  127. (char-numeric? #\a) => #f; (char-numeric? #\3) => #t
  128.  
  129. (char-upcase #\A) => #\A; (char-upcase #\a) => #\A; (char-upcase #\@)=> #\@
  130.  
  131. (char-upper-case? #\a) => #f; (char-upper-case? #\A) => #t; (char-upper-case? #\3) => #f
  132.  
  133. (char-whitespace? #\A) => #f; (char-whitespace? #\space) => #t
  134.  
  135. (char<=? #\c #\a) => #f; (char<=? #\c #\d) => #t; (char<=? #\c #\c) => #t
  136.  
  137. (char<? #\c #\a) => #f; (char<? #\c #\d) => #t; (char<? #\c #\c) => #f
  138.  
  139. (char=? #\c #\a) => #f; (char=? #\c #\d) => #f; (char=? #\c #\c) => #t
  140.  
  141. (char>=? #\c #\a) => #t; (char>=? #\c #\d) => #f; (char>=? #\c #\c) => #t
  142.  
  143. (char>? #\c #\a) => #t; (char>? #\c #\d) => #f; (char>? #\c #\c) => #f
  144.  
  145. (char? #\a) => #t; (char? 'foo) => #f
  146.  
  147. (complex? 3) => #t; (complex? 'foo) => #f
  148.  
  149. e::top-loop-code
  150.  
  151. (cons 1 2) => (1 . 2); (cons 1 '(2 3)) => (1 2 3); (cons 1 ()) => (1); (cons () ()) => (())
  152.  
  153. (cos 0) => 1; (cos 3.14) => -0.9999987
  154.  
  155. c::define
  156.  
  157.  
  158.  
  159. (display 3) ΓǪ writes "3" on the default output port; (display 3 <an output port>) ΓǪ writes "3" on the given output port
  160.  
  161.  
  162.  
  163.  
  164.  
  165. (and #t (display 'Hello) #t 3) displays "hello" on the default output port and returns 3; (and #f (display 'hello)) displays nothing and returns #f.
  166.  
  167.  
  168.  
  169.  
  170.  
  171. (case (+ 2 2) ((1 2) 'buckle-my-shoe) ((3 4) 'shut-the-door)) => shut-the-door; (case 5 ((1 2 3) 'finite) (else 'many)) => many; (case 5 ((1 2 3) 'finite)) => #t.
  172.  
  173.  
  174.  
  175.  
  176.  
  177. (e::fixnum? 42) => #t; (e::fixnum? 42.5) => #f; (e::fixnum? 1'foo) => #f
  178.  
  179. (e::flonum? 42) => #f; (e::fixnum? 42.5) => #t; (e::flonum? 1'foo) => #f
  180.  
  181. (e::forced? (delay 3)) => #f; (e::forced? ((lambda (x) (force x) x) (delay 3))) => #t
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189. (e::promise? (delay 3)) => #t; (e::promise? 3) => #f
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. else
  202.  
  203. (eq? 2 2) => #t; (eq? 2 #L2.0) => #f; (eq? '(1 2 3) '(1 2 3)) => #f
  204.  
  205. (equal? 2 2) => #t; (equal? 2 #L#E2.0) => #t; (equal? '(1 2 3) '(1 2 3)) => #t
  206.  
  207. (eqv? 2 2) => #t; (eqv? 2 #L#E2.0) => #t; (eqv? '(1 2 3) '(1 2 3)) => #f
  208.  
  209. (even? 2) => #t; (even? 1) => #f
  210.  
  211.  
  212.  
  213. (exact? #e1) => #t; (exact? #i1) => #f
  214.  
  215. (exp 3) => 20.08554
  216.  
  217. (expt 2 3) => 8.; (expt 3 2) => 9.
  218.  
  219. (floor -1.5) => -2.; (floor -1.) => -1.; (floor 1.01) => 1.
  220.  
  221. (for-each (lambda (x y) (display (sqrt (+ (* x x) (* y y))))(display " ")) '(3 5 8) '(4 12 15)) => 5. 13. 17. #t
  222.  
  223. (force (delay 3)) => 3; (force (force (delay 3))) => 3
  224.  
  225. (if (> 3 2) 'first 'second) => first; (if (> 3 4) 'first 'second) => second; (if (> 3 4) 'first) => #f.
  226.  
  227.  
  228.  
  229. (inexact? #e1) => #f; (inexact? #i1) => #t
  230.  
  231. (char->integer #\a) => 97
  232.  
  233. (integer? 3.000) => #t; (integer? 'foo) => #f
  234.  
  235. (lambda (n) (+ n 3)) returns a procedure which increments a number by three.
  236.  
  237. (last-pair '(1)) => (1); (last-pair '(1 2 3)) => (3); (last-pair '(1 2 . 3)) => (2 . 3)
  238.  
  239. (length '(1 2 3 4 5)) => 5
  240.  
  241.  
  242.  
  243. (define a 42) followed by (let* ((a 3) (b a)) b) => 3.
  244.  
  245. (letrec ((odd (lambda (n) (if (= n 0) #f (even (- n 1))))) (even (lambda (n) (if (= n 0) #t (odd (- n 1)))))) (odd 3)) => #t.
  246.  
  247. (list 1 2 (+ 1 2)) => (1 2 3); (list) => ()
  248.  
  249. (list->string '(#\A #\e #\c)) => "Aec"
  250.  
  251. (list->vector '(#\A #\e #\c)) => #(#\A #\e #\c)
  252.  
  253. (list-ref '(1 2 3) 0) => 1; (list-ref '(1 2 3) 1) => 2
  254.  
  255. (list-tail '(1 2 3) 0) => (1 2 3); (list-tail '(1 2 3) 2) => (3); (list-tail '(1 2 . 3) 2) => 3
  256.  
  257. (log 2) => 0.6931472
  258.  
  259. (make-string 3) => ; (make-string 3 #\x) => "xxx"
  260.  
  261. (make-vector 3) => #(() () ()); (make-vector 3 #\x) => #(#\x #\x #\x)
  262.  
  263. (map (lambda (x y) (sqrt (+ (* x x) (* y y)))) '(3 5 8) '(4 12 15)) => (5. 13. 17.)
  264.  
  265. (max 1 3 2) => 3
  266.  
  267. (member '(1 2) '(2 #L#E2 (1 2))) => ((1 2)); (member #L#E2 '(2 #L#E2 (1 2))) => (2 2 (1 2)); (member 2 '(2 #L#E2 (1 2))) => (2 2 (1 2))
  268.  
  269. (memq '(1 2) '(2 #L#E2 (1 2))) => (); (memq #L#E2 '(2 #L#E2 (1 2))) => (); (memq 2 '(2 #L#E2 (1 2))) => (2 2 (1 2))
  270.  
  271. (memv '(1 2) '(2 #L#E2 (1 2))) => (); (memv #L#E2 '(2 #L#E2 (1 2))) => (2 2 (1 2)); (memv 2 '(2 #L#E2 (1 2))) => (2 2 (1 2))
  272.  
  273. (min 1 3 2) => 1
  274.  
  275. (modulo 13 4) => 1; (modulo 13 -4) => -3; (modulo -13 4) => 3; (modulo -13 -4) => -1
  276.  
  277. (negative? -1) => #t; (negative? 0) => #f; (negative? 1) => #f
  278.  
  279.  
  280.  
  281. (not #f) => #t; (not 'foo) => #f
  282.  
  283. (null? ()) => #t; (null? 'foo) => #f
  284.  
  285. (number? 2.718) => #t; (number? 'foo) => #f
  286.  
  287. (odd? 2) => #f; (odd? 1) => #t
  288.  
  289. (cond (#t 'true) (else 'false)) => true; (cond (#f 'true) (else 'false)) => false; (cond (#f 'true)) => #t.
  290.  
  291. (pair? (cons 'foo 'bar)) => #t; (pair? ()) => #f; (pair? 'foo) => #f
  292.  
  293. (positive? -1) => #f; (positive? 0) => #f; (positive? 1) => #t
  294.  
  295. (procedure? +) => #t; (procedure? (lambda( x ) x)) => #t; (procedure? 'foo) => #f
  296.  
  297. `((+ 1 2) ,(+ 1 2)) => ((1 2) 3); ``((+ 1 2) ,(+ 1 2) ,,(+ 1 2)) => (quasiquote ((+ 1 2) (unquote (+ 1 2)) (unquote 3))).
  298.  
  299. '(+ 2 2) => (+ 2 2).
  300.  
  301. (quotient 13 4) => 3; (quotient 13 -4) => -3; (quotient -13 4) => -3; (quotient -13 -4) => 3
  302.  
  303. (rational? 3) => #t; (rational? 3.14) => #t; (rational? 'foo) => #f
  304.  
  305. (real? 3) => #t; (real? 3.14) => #t; (real? 'foo) => #f
  306.  
  307. (remainder 13 4) => 1; (remainder 13 -4) => 1; (remainder -13 4) => -1; (remainder -13 -4) => -1
  308.  
  309. (reverse '(1 2 3)) => (3 2 1)
  310.  
  311. (round 0.5) => 0.; (round 1.5) => 2.; (round 0.4999) => 0.; (round 0.5001) => 1.
  312.  
  313. (define a 1) followed by (set! a 3) makes a be 3.
  314.  
  315. ((lambda (p) (set-car! p 'foo) p) (cons 1 2)) => (foo . 2)
  316.  
  317. ((lambda (p) (set-cdr! p 'foo) p) (cons 1 2)) => (1 . foo)
  318.  
  319. (sin 0) => 0.; (sin 3.14) => 1.592548e-3
  320.  
  321. (sqrt 0) => 0.; (sqrt 3.14) => 1.772004
  322.  
  323. (string->list "Abc") => (#A #b #c)
  324.  
  325. (string->number "10" 'e 'x) => 16; (string->number "10" 'e 'd) => 10; (string->number "10" 'e 'o) => 8; (string->number "10" 'e 'b) => 2
  326.  
  327. (string->symbol "Foo") => Foo
  328.  
  329. (string-append "abc" "def" "ghi") => "abcdefghi"
  330.  
  331. (string-ci<=? "Aa" "ab") => #t; (string-ci<=? "Aa" "aa") => #t; (string-ci<=? "Ab" "aa") => #f
  332.  
  333. (string-ci<? "Aa" "ab") => #t; (string-ci<? "Aa" "aa") => #f; (string-ci<? "Ab" "aa") => #f
  334.  
  335. (string-ci=? "Aa" "ab") => #f; (string-ci=? "Aa" "aa") => #t; (string-ci=? "Ab" "aa") => #f
  336.  
  337. (string-ci>=? "Aa" "ab") => #f; (string-ci>=? "Aa" "aa") => #t; (string-ci>=? "Ab" "aa") => #t
  338.  
  339. (string-ci>? "Aa" "ab") => #f; (string-ci>? "Aa" "aa") => #f; (string-ci>? "Ab" "aa") => #t
  340.  
  341. (string-copy "abc") => "abc"
  342.  
  343. ((lambda (s) (string-fill! s #\a) s) "zzz") => "aaa"
  344.  
  345. (string-length "abc") => 3; (string-length "") => 0
  346.  
  347. (string-ref "abc" 0) => #\a; (string-ref "abc" 2) => #\c
  348.  
  349. ((lambda( s ) (string-set! s 1 #\X) s) (make-string 3)) => " X "
  350.  
  351. (string<=? "aa" "ab") => #t; (string<=? "aa" "aa") => #t; (string<=? "ab" "aa") => #f
  352.  
  353. (string<? "aa" "ab") => #t; (string<? "aa" "aa") => #f; (string<? "ab" "aa") => #f
  354.  
  355. (string=? "aa" "ab") => #f; (string=? "aa" "aa") => #t; (string=? "ab" "aa") => #f
  356.  
  357. (string>=? "aa" "ab") => #f; (string>=? "aa" "aa") => #t; (string>=? "ab" "aa") => #t
  358.  
  359. (string>? "aa" "ab") => #f; (string>? "aa" "aa") => #f; (string>? "ab" "aa") => #t
  360.  
  361. (string? "abc") => #t; (string? 'foo) => #f
  362.  
  363. (substring "abcdef" 2 5) => "cde"
  364.  
  365. (symbol->string 'foo) => "foo"
  366.  
  367. (symbol? 'foo) => #t; (symbol? 3) => #f
  368.  
  369. (tan 0) => 0.; (tan 1.57) => 1255.848
  370.  
  371. (truncate 0.5) => 0.; (truncate -1.5) => -1.; (truncate -0.9999) => 0.; (truncate 1.0001) => 1.
  372.  
  373. `((+ 1 2) ,(+ 1 2)) => ((1 2) 3); ``((+ 1 2) ,(+ 1 2) ,,(+ 1 2)) => (quasiquote ((+ 1 2) (unquote (+ 1 2)) (unquote 3))).
  374.  
  375. `(1 2 ,@(list (+ 2 1) (+ 2 2))) => (1 2 3 4).
  376.  
  377. (vector 1 2 3) => #(1 2 3)
  378.  
  379. (vector->list '#(1 2 3)) => (1 2 3)
  380.  
  381. ((lambda( v ) (vector-fill! v 3) v) (make-vector 5)) => #(3 3 3 3 3)
  382.  
  383. (vector-length '#(1 2 3)) => 3
  384.  
  385. (vector-ref '#(#\x #\y #\z) 1) => #\y
  386.  
  387. ((lambda( v ) (vector-set! v 1 #\X) v) (make-vector 3)) => #(() #\X ())
  388.  
  389. (vector? '#()) => #t; (vector? '#(1 2 3)) => #t; (vector? 'foo) => #f
  390.  
  391. (write 3) ΓǪ writes "3" on the default output port; (write 3 <an output port>) ΓǪ writes "3" on the given output port
  392.  
  393. (zero? 0) => #t; (zero? 1) => #f
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. (input-port? (open-input-file "foo")) => #t; (input-port? 'foo) => #f
  404.  
  405. (output-port? (open-output-file "foo")) => #t; (output-port? 'foo) => #f
  406.  
  407.  
  408.  
  409. (write-char #\a) ΓǪ writes "a" to the default output port; (write-char #\a <an output port>) writes "a" to the given output port)
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433. (do ((x 1 (+ x 1))) ((= x 5) (display "Done") (newline)) (display x) (display " ")) => 1 2 3 4 Done
  434.  
  435.  
  436.  
  437.  
  438.  
  439. ((lambda (x) (close-input-port x) (e::closed-port? x)) (open-input-file "foo")) => #t; (e::closed-port? 'foo) => #f
  440.  
  441. (e::inf? 3) => #f; (e::inf? #t) => #f; (e::inf? 1.e10000) => #t
  442.  
  443. (e::nan? 3) => #f; (e::nan? #t) => #f; (e::nan? 1.e10000) => #f; (e::nan? (- 1.e10000 1e10000)) => #t
  444.  
  445. (number->string 3.1415926535 '(fix 3)) => "3.142"; (number->string 3.1415926535 '(sci 4 2)) => "31.42e-1"; and many, many more
  446.  
  447. (gcd 12 28 60) => 4
  448.  
  449. (lcm 12 28 60) => 420
  450.  
  451.  
  452.  
  453.  
  454.  
  455. e::debug
  456.  
  457. (e::cons-with-continuation '(+ 2 2)) => 4
  458.  
  459. ΓÇó
  460.  
  461. (e::bound-instance? 'asdfasdfghkkijl) => #f (probably); (e::bound-instance? '+) => #t
  462.  
  463. (define a 42) makes a 42.
  464.  
  465. ΓÇó
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485. (e::address? (e::store 'foo)) => #t; (e::address? 'foo) => #f
  486.  
  487.  
  488.  
  489. (e::load (e::store 'foo)) => foo
  490.  
  491. (e::load (e::store 'foo)) => #<Pointer to memory location (hex) <ΓǪ a number>>
  492.  
  493. (e::macro foo (lambda (body) `(list ,@(cdr body)))) makes "foo" a macro that does approximately what "list" does.
  494.  
  495. (or #t (display 'Hello) #t 3) displays nothing on the default output port and returns #t; (or #f (display 'hello)) displays "hello" on the default output port and returns #t.
  496.  
  497. (e::macro? let) => #t; (e::macro? 'foo) => #f
  498.  
  499. (e::expand-macro '(let ((x 3)) (+ x 4))) => ((lambda (x) (+ x 4)) 3)
  500.  
  501.  
  502.  
  503. c::push
  504.  
  505. c::apply
  506.  
  507. (e::permanent? '+) => #t; (e::permanent? 'JustDrummingMyFingersOnTheKeyboard) => #f (probably)
  508.  
  509.  
  510.  
  511. At topΓÇôlevel, (define a 3) folllowed by (c::symeval 'a) => 3
  512.  
  513. c::reset
  514.  
  515.  
  516.  
  517. c::apply-end
  518.  
  519. c::if
  520.  
  521. c::if-aux-code
  522.  
  523. c::noop
  524.  
  525. c::s0-to-c
  526.  
  527. c::stack-ref
  528.  
  529. c::compiled-block
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537. (e::long-float? #L1) => #t; (e::long-float? 'foo) => #f
  538.  
  539. (e::short-float? #S1) => #t; (e::short-float? 'foo) => #f
  540.  
  541. ΓÇô
  542.  
  543. ┬▒
  544.  
  545. ┬▒┬▒
  546.  
  547. ┬▒┬▒┬▒
  548.  
  549. ┬░
  550.  
  551. ┬░┬░
  552.  
  553. ┬░┬░┬░
  554.  
  555.  
  556.  
  557. (define a 42) followed by (let ((a 3) (b a)) b) => 42.
  558.  
  559. (let fact ((n 6)) (if (= n 0) 1 (* n (fact (- n 1))))) => 720.
  560.  
  561.  
  562.  
  563. (e::bit-and #xC #xA) => 8
  564.  
  565. (e::bit-not #xC) => -13
  566.  
  567. (e::bit-or #xC #xA) => 14
  568.  
  569. (e::bit-xor #xC #xA) => 6
  570.  
  571. (e::bit-shift-left 3 4) => 48
  572.  
  573. (e::bit-shift-right-arithmetic 48 2) => 12; (e::bit-shift-right-arithmetic -1 2) => -1; (e::bit-shift-right-arithmetic -#x40000000 2) => -268435456
  574.  
  575. (e::bit-shift-right-logical 48 2) => 12; (e::bit-shift-right-logical -1 2) => 536870911; (e::bit-shift-right-logical -#x40000000 2) => 268435456
  576.  
  577. (e::file-exists? "SomeExistingFile") => #t; (e::file-exists? "NoSuchFile") => #f
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585. (define inc (e::compile-form (lambda (x) (+ x 1)))) causes "inc" to be bound to a compiled function that increments its argument
  586.  
  587.  
  588.  
  589. (e::define-no-compile foo (lambda (x) x)) makes foo an uncompiled procedure which returns its argument.
  590.  
  591. (e::proper-list? '(1 2 3)) => #t; (e::proper-list? '(1 2 . 3)) => #f; (e::proper-list? 1) => #f; (e::proper-list? '()) => #f
  592.  
  593. (e::memvf '(1 2) '(2 #L#E2 (1 2))) => #f; (e::memvf #L#E2 '(2 #L#E2 (1 2))) => (2 2 (1 2)); (e::memvf 2 '(2 #L#E2 (1 2))) => (2 2 (1 2))
  594.  
  595. (e::not-null? '()) => #f; (e::not-null? 'foo) => #t
  596.  
  597.